<template>
  <div class="more-action">
    <!-- 状态一 -->
    <van-cell-group v-if="!isReport">
      <van-cell @click="$emit('Cl_dislikes')">不感兴趣</van-cell>
      <van-cell is-link @click="isReport = true">反馈垃圾内容</van-cell>
      <van-cell>拉黑作者</van-cell>
    </van-cell-group>
    <!-- 状态二 反馈-->
    <van-cell-group v-else>
      <van-cell icon="arrow-left" @click="isReport = false">返回</van-cell>
      <!-- <van-cell>侵权</van-cell>
      <van-cell>色情</van-cell>
      <van-cell>暴力</van-cell>
      <van-cell>低俗</van-cell>
      <van-cell>不适</van-cell>
      <van-cell>错误</van-cell>
      <van-cell>其他</van-cell> -->
      <!-- 抛出事件 具体功能 由父组件来做 -->
      <van-cell
        v-for="item in reportsTypeList"
        :key="item.value"
        @click="$emit('report', item.value)"
        >{{ item.label }}</van-cell
      >
    </van-cell-group>
  </div>
</template>

<script>
import reportsTypeList from '@/constant/reports';
export default {
  name: 'MoreAction',
  data () {
    return {
      reportsTypeList: reportsTypeList,
      isReport: false // 是否是处于状态二：反馈
    };
  }
};
</script>

<style lang='less' scoped>
.more-action {
  border-radius: 4px;
}
</style>
